﻿using System;
using System.Collections.Generic;
using UnityEngine;

[Serializable]
public class Attribute:IInitByActor,IDispose
{
    protected static void OnValueChange(Actor actor, EnumAttributeItem attriType,Attribute attribute) 
    {
        /*
         * 角色所有属性变更消息汇聚的中心
         */
        Debug.Log($"[Attribute] OnValueChange Actor:{actor.Name} attriType:{attriType} attribute:{attribute}");
    }

    public void Dispose()
    {
        _actor = null;
    }

    public void InitByActor(Actor actor)
    {
        _actor = actor;
    }
    private Actor _actor;
    public Actor Actor
    {
        get {
            return _actor;
        }
    }
}

public enum EnumAttributeItem
{
    /// <summary>
    /// BattleCharactor
    /// </summary>
    BattleCharactor,
    BattleCharactor_HP,
    BattleCharactor_MP,
    BattleCharactor_MAXHP,
    BattleCharactor_MAXMP,

    /// <summary>
    /// MoveMent
    /// </summary>
    Movement,
    MoveMent_SpeedValue,
    
    /// <summary>
    /// Transform
    /// </summary>
    Transform,
    Transform_Position,
    Transform_Rotation,

    /// <summary>
    /// UserData
    /// </summary>
    UserData,
    UserData_Level,

    /// <summary>
    /// HeroInfo
    /// </summary>
    HeroInfo,
    HeroInfo_Name,
}
